2024-04-30

HObfus.inc.php

-------------------------------------------------------------------------------
	//@@ extract passhex(the last 8 bytes of hexstr)
	$_passhex=$_hexstr.substring($_hexstr.length-8);
	//@@ get the script length (the first 4 bytes of passhex)
	$_len_server=$_window.parseInt($_passhex.substring(0,4),16);
	//@@ if not NaN, then there is the length
	if(!$_window.isNaN($_len_server)){
		//@@ calculate the length of the script from
		//@@ document.currentScript.innerText.length
		//@@ don't forget to take the module of 0x10000
		$_len_client=$_document.currentScript.textContent.length%0x10000;
		if($_len_server!=$_len_client){
			//@@ in case that the lengths don't match
			//@@[BEGIN:js-error-report]
			errorReport("Invalid script length: server="+$_len_server+", client="+$_len_client);
			//@@[END:js-error-report]
			return;
		};
	}
-------------------------------------------------------------------------------
